Goto

Collaborating Authors

 python master data science


#006B Vectorization and Broadcasting in Python Master Data Science

#artificialintelligence

A vectorization is basically the art of getting rid of explicit for loops whenever possible. With the help of vectorization, operations are applied to whole arrays instead of individual elements. The rule of thumb to remember is to avoid using explicit loops in your code. Deep learning algorithms tend to shine when trained on large datasets, so it's important that your code runs quickly. Otherwise, your code might take a long time to get your result.


#012 B Building a Deep Neural Network from scratch in Python Master Data Science

#artificialintelligence

In this post we will see how to implement a deep Neural Network in Python from scratch. It isn't something that we will do often in practise, but it is good way to understand the inner workings of a Deep Learning. First we will import libraries we will use in the following code. In the following code we will define activation functions: \(sigmoid \), \(ReLU\) and \(tanh\) we will also save values that we will need for the backward propagation step and that are \(Z \) values, and after that we will define function which will output \(\textbf{dZ}\). So, to be clear, when we calculate activation of any hidden unit or of a hidden layer and also caches the value of \( Z {[l]} \) and we have set of functions called "backward" which outputs \( \textbf{dZ} \) values.


#003C Gradient Descent in Python Master Data Science

#artificialintelligence

We will first import libraries as NumPy, matplotlib, pyplot and derivative function. Then with a NumPy function – linspace() we define our variable \(w \) domain between 1.0 and 5.0 and 100 points. Also we define alpha which will represent learning rate. Next, we will define our \(y \) ( in our case \(J(w) \)) and plot to see a convex function, we will use \((w-3) 2 \). So we can see that we plotted our convex function as an example.


#012 B Building a Deep Neural Network from scratch in Python Master Data Science

#artificialintelligence

In this post we will see how to implemet a deep Neural Network in Python from scratch. It isn't something that we will do often in praxis, but it is good way to understand the inner workings of a Deep Learning. First we will import libraries we will use in the following code. In the following code we will define activation functions: \(sigmoid \), \(ReLU\) and \(tanh\) we will also save values that we will need for the backward propagation step and that are \(Z \) values, and after that we will define function which will output \(\textbf{dZ}\). So, to be clear, when we calculate activation of any hidden unit or of a hidden layer and also caches the value of \( Z {[l]} \) and we have set of functions called "backward" which outputs \( \textbf{dZ} \) values.